# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BareMetalSolution.V2.Model.OSImage do
  @moduledoc """
  Operation System image.

  ## Attributes

  *   `applicableInstanceTypes` (*type:* `list(String.t)`, *default:* `nil`) - Instance types this image is applicable to. [Available types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
  *   `code` (*type:* `String.t`, *default:* `nil`) - OS Image code.
  *   `description` (*type:* `String.t`, *default:* `nil`) - OS Image description.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. OS Image's unique name.
  *   `supportedNetworkTemplates` (*type:* `list(String.t)`, *default:* `nil`) - Network templates that can be used with this OS Image.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :applicableInstanceTypes => list(String.t()) | nil,
          :code => String.t() | nil,
          :description => String.t() | nil,
          :name => String.t() | nil,
          :supportedNetworkTemplates => list(String.t()) | nil
        }

  field(:applicableInstanceTypes, type: :list)
  field(:code)
  field(:description)
  field(:name)
  field(:supportedNetworkTemplates, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.BareMetalSolution.V2.Model.OSImage do
  def decode(value, options) do
    GoogleApi.BareMetalSolution.V2.Model.OSImage.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BareMetalSolution.V2.Model.OSImage do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
